﻿<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<IEnumerable<com.IronOne.BoardAppWeb.Models.Entity.iPadDB>>" %>

<response>
  <Header>
    <Status>
     <%
       ModelState err = ViewContext.ViewData.ModelState["err"];
       com.IronOne.BoardAppWeb.Controllers.GenException result = null;

       if (err != null)
       {
           result = (com.IronOne.BoardAppWeb.Controllers.GenException)err.Errors.ElementAt(0).Exception;  %>
          <code><%: result.Code%></code>
          <description><%: com.IronOne.BoardAppWeb.Lang.Resources.ResourceManager.GetString(result.Code)%></description>  
       <%}
       else
       { %>
         <code>0</code>
         <description>Success</description>         
       <%} %> 
    </Status>

    <Tracking>
        <UserName><%: ViewData["UserName"]%></UserName>
        <ServerId>2</ServerId>
        <ServerTime><%= DateTime.Now%></ServerTime>
        <WebAppVersion><%: ViewData["iPaVersion"]%></WebAppVersion>
        <CooperateId>3</CooperateId>
        <DBVersion><%: ViewData["dbVersion"] %></DBVersion>
    </Tracking>
  </Header>
    
  <Data>
    <% if (Model != null && Model.Count() != 0)
       { %>
        <DBInstructions>
          <% foreach (var item in Model)
             { %>
                 <SQL><%: item.Script %></SQL>
          <% } %>
        </DBInstructions>
    <% }
       else
       { %>
           <SpecialMessage><%: ViewData["Message"] %></SpecialMessage>
    <% } %>
  </Data>
</response>